class User {
  String gender;
  String name;
  String location;
  int id;
  String avatar;
  String email;
  String url;
  User.fromJson(Map<String, dynamic> map) {
    gender = map['gender'];
    name = map['name'];
    location = map['location'];
    id = map['id'];
    avatar = map['avatar'];
    email = map['email'];
    url = map['url'];
  }

  // json.encode 方法会内部调用对象的 toJson 方法
  Map toJson() {
    Map map = new Map();
    map['gender'] = this.gender;
    map['name'] = this.name;
    map['location'] = this.location;
    map['id'] = this.id;
    map['avatar'] = this.avatar;
    map['email'] = this.email;
    map['url'] = this.url;
    return map;
  }

  @override
  String toString() {
    return "User {gender: $gender , name: $name , location: $location , id: $id , avatar: $avatar , email: $email , url: $url}";
  }
}

///
///
///gender: male, name: 许旭旭, location: 江西 宜春, id: 4270777, avatar: https://static.oschina.net/uploads/user/2135/4270777_50.jpg?t=1573957025000, email: 18370014984@163.com, url: https://my.oschina.net/u/4270777}
///
///
